package com.peanut.boot.servlet;


import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @className: com.peanut.boot.servlet-> Myservlet
 * @description: 学习原生servlet组件注入。
 * @author: chenhs
 * @createDate: 2021-11-21 11:11
 * @version: 1.0
 */
// @WebServlet(urlPatterns="/myServlet") 指定访问路径。
@WebServlet(urlPatterns="/myServlet")
public class Myservlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("进入原生的servlet");
        resp.getWriter().write("123456");
    }
}
